﻿using Oplug.EntityFramework;
using Oplug.EntityFramework.RossLive;
using System;

namespace Oplug.Services
{
    public class DataCodeService: IDisposable
    {
        public OplugLiveDbContext dbContext;
        public IRepository<DataCode, int> repository;
        public DataCodeService(string nameOrConnectionString)
        {
            dbContext = new OplugLiveDbContext(nameOrConnectionString);
            repository = new Repository<DataCode, int>(dbContext);
        }
        public void Dispose()
        {
            dbContext.Dispose();
        }
    }
}
